﻿function CheckBox_Click() {
    var arr_cbx = document.getElementById("treeTable").getElementsByTagName("input");

    var value = "";
    for (var i = 0; i < arr_cbx.length; i++) {
        value += arr_cbx[i].id.replace("cbxPS_","") + ":" + arr_cbx[i].checked;
        if (i < arr_cbx.length - 1)
            value += ",";
    }

   // alert(value);

    document.getElementById("HiddenField1").value = value;
}

var cityId = null;
var areaId = null;
var streetId = null;

function init() {

    //alert(cityId);

    if (cityId == null) {
        BindCity();
    } 
    else {
        BindCity(cityId, areaId, streetId);
    }
    $(document).ready(function () {
        $("#treeTable").treeTable({ clickableNodeNames: true, initialState: "expanded" });
    });

}

